package com.zkingsoft.interceptors;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;


public class CheckAdminiLoginInterceptor implements HandlerInterceptor {
	
	Logger log = Logger.getLogger(this.getClass());
	public void afterCompletion(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, Exception arg3)
			throws Exception {
		
	}

	public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2, ModelAndView arg3) throws Exception {
		
	}

	/**
	 * 检查管理员是否登陆
	 */
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
			Object obj) throws Exception {
		/*log.info("进入管理员拦截器...");
		if(SessionUtils.getSessionObject(CommonConstance.SESSION_KEY_ADMIN)==null){
			response.sendRedirect(request.getContextPath()+"/publicPage/toAdminLogin.jsp");
			return false;
		}else{
		
		}*/
		return true;
	}


}
